package com.yuven.baselib.component.task;

import io.reactivex.ObservableTransformer;

/**
 * 获取{@link com.trello.rxlifecycle2.LifecycleProvider}
 * 来提供给Rx任务绑定组件的声明周期
 */
public interface IRxLifeManager extends IRxTaskRecorder {

    /**
     * 绑定{@link com.trello.rxlifecycle2.android.ActivityEvent#DESTROY}事件
     *
     * @param <T>
     * @return
     */
    <T> ObservableTransformer<T, T> composeDestroy();

    /**
     * 绑定{@link com.trello.rxlifecycle2.android.ActivityEvent#DESTROY}事件
     * 绑定{@link RxSchedulerHelper#io_main()}通用io操作调度器
     *
     * @param <T>
     * @return
     */
    <T> ObservableTransformer<T, T> composeHttpDestroy();
}
